package view;

import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;

import javax.swing.JPanel;

//@author A0081236L
public class BackgroundPanel extends JPanel
{
	private Image img;
    
    public BackgroundPanel()
    {
    	super();
        // Loads the background image and stores in img object.
        img = Toolkit.getDefaultToolkit().getImage("src/images/Background.jpg");
    }

    public void paintComponent(Graphics g)
    {
        // Draws the img to the BackgroundPanel.
        g.drawImage(img, 0, 0, null);
    }
    
    
}